package com.xiaolun.single;

//懒汉式（线程不安全）
public class Singleton5 {
    private static Singleton5 instance;
    private Singleton5(){
    }

    public static  Singleton5 getInstance(){
        if (instance == null){
            synchronized (Singleton.class){
                instance = new Singleton5();
            }
        }
        return instance;
    }
}
